$(function () {
	showGraph(vm.showGraph.data,vm.showGraph.links);
});
function layerOpen() {
	layer.open({
		type : 1,
		title : '',
		skin : 'layui-layer-rim', //加上边框
		area : [ '1020px', '420px' ], //宽高
		shadeClose : true,
		content : $('#showGraph')
	});
}
function showGraph(data,links){
	var myChart = echarts.init(document.getElementById('showGraph'));
    var option = {
    	    title: {
    	        text: '数据图谱'
    	    },
    	    tooltip: {},
    	    animationDurationUpdate: 1500,
    	    animationEasingUpdate: 'quinticInOut',
    	    series : [
    	        {
    	            type: 'graph',
    	            layout: 'none',
    	            symbolSize: 50,
    	            roam:false,
    	            label: {
    	                normal: {
    	                    show: true
    	                }
    	            },
    	            edgeSymbol: ['circle', 'arrow'],
    	            edgeSymbolSize: [4, 10],
    	            edgeLabel: {
    	                normal: {
    	                    textStyle: {
    	                        fontSize: 20
    	                    }
    	                }
    	            },
    	            data: data,
    	            links:links,
    	            lineStyle: {
    	                normal: {
    	                    opacity: 0.9,
    	                    width: 2,
    	                    curveness: 0
    	                }
    	            }
    	        }
    	    ]
    	};

    myChart.setOption(option);
}